<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <link href="/sap/demo.css" rel="stylesheet" type="text/css" />
    <script src="/sap/scripts/boot.js" type="text/javascript"></script>


    <style type="text/css">
        body{
            margin:0;padding:0;border:0;width:100%;height:100%;overflow:hidden;
        }
    </style>
</head>

<body>

<div style="width:800px;">
    <div class="mini-toolbar" style="border-bottom:0;padding:0px;">
        <table style="width:100%;">
            <tr>
            </tr>
        </table>
    </div>
</div>
<div id="datagrid1" class="mini-datagrid" style="width:900px;height:400px;"
     url="/report/dogetlifecycle/orderid/<?php echo $orderid ?>/DocEntry/<?php echo $DocEntry ?>/LineId/<?php echo $LineId ?>" idField="id"
     allowResize="true" pageSize="50"
     allowCellEdit="true" allowCellSelect="true" multiSelect="true"
     editNextOnEnterKey="true"

>
    <div property="columns">

        <!--<div header="平台代码" field="CardCode">-->
            <!--<input property="readonly" class="mini-textbox" style="width:100%;"/>-->
        <!--</div>-->

        <div header="处理系统状态" field="OpSyStatus" allowSort="true">
            <input property="readonly" class="mini-textbox" style="width:100%;"/>
        </div>

        <div header="处理系统处理时间" field="OpSyDealDateTime" allowSort="true">
            <input property="readonly" class="mini-textbox" style="width:100%;"/>
        </div>

        <div header="操作人" field="Operater" allowSort="true">
            <input property="readonly" class="mini-textbox" style="width:100%;"/>
        </div>

        <div header="处理系统" field="OpSystem" allowSort="true">
            <input property="readonly" class="mini-textbox" style="width:100%;"/>
        </div>

    </div>

</div>


</div>
</div>
<script type="text/javascript">

    mini.parse();

    var grid = mini.get("datagrid1");
    grid.load();

    //////////////////////////////////////////////////////

    //绘制表格
    grid.on("drawcell", function (e) {

        var record = e.record,
            column = e.column,
            field = e.field,
            value = e.value;

        //格式化日期
        if (field == "OpSyDealDateTime" ) {
            if (mini.isDate(value)) e.cellHtml = mini.formatDate(value, "yyyy-MM-dd HH:mm:ss");
        }

    });

    function search() {
        var key = mini.get("key").getValue();
        grid.load({ sid: key });
    }


    grid.on("celleditenter", function (e) {
        var index = grid.indexOf(e.record);
        if (index == grid.getData().length - 1) {
            var row = {};
            grid.addRow(row);
        }
    });

    grid.on("beforeload", function (e) {
        if (grid.getChanges().length > 0) {
            if (confirm("有增删改的数据未保存，是否取消本次操作？")) {
                e.cancel = true;
            }
        }
    });

</script>

</body>

</html>